package com.hoshiibuy.spu.param;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.time.LocalDateTime;

/**
 * SPU营销资料修改参数实体
 *
 * @author : yangcheng
 * @date : 2019/4/30 16:17
 * @mail : maiboyc@163.com
 **/
@ApiModel
@Data
public class ExtSpuUpdateParam {
    // ID
    @NotNull(message = "ID不能为空")
    @ApiModelProperty(name = "id", value = "ID", required = true, dataType = "java.lang.Long", example = "3171776001692664100")
    private Long id;

    // spu id
    @NotNull(message = "spuId不能为空")
    @ApiModelProperty(name = "spuid", value = "spuId", required = true, dataType = "java.lang.Long", example = "3171776001692664000")
    private Long spuid;

    // 商品视频
    @NotNull(message = "商品视频不能为空")
    @ApiModelProperty(name = "spuVideo", value = "商品视频", required = true, dataType = "java.lang.String", example = "rtsp://xxx.com/video/商品.mp4")
    private String spuVideo;

    // 图文描述
    @NotNull(message = "图文描述不能为空")
    @ApiModelProperty(name = "spuDescription", value = "图文描述", required = true, dataType = "java.lang.String", example = "图文描述")
    private String spuDescription;

    // 商品标题
    @NotNull(message = "商品标题不能为空")
    @ApiModelProperty(name = "title", value = "商品标题", required = true, dataType = "java.lang.String", example = "商品标题")
    private String title;

    // 商品主图
    @NotNull(message = "商品主图不能为空")
    @ApiModelProperty(name = "spuImage", value = "商品主图", required = true, dataType = "java.lang.String", example = "http://xxx.com/image/主图.jpg")
    private String spuImage;

    // 是否开票
    @NotNull(message = "是否开票不能为空")
    @ApiModelProperty(name = "isInvoice", value = "是否开票", required = true, dataType = "java.lang.Integer", example = "0")
    private Integer isInvoice;

    // 售后说明
    @NotNull(message = "售后说明不能为空")
    @ApiModelProperty(name = "serviceDescription", value = "售后说明", required = true, dataType = "java.lang.String", example = "售后说明")
    private String serviceDescription;

    // 属性
    @NotNull(message = "属性不能为空")
    @ApiModelProperty(name = "extendProperty", value = "属性", required = true, dataType = "java.lang.String", example = "{}")
    private String extendProperty;

    // 规格
    @NotNull(message = "规格不能为空")
    @ApiModelProperty(name = "extendSpec", value = "规格", required = true, dataType = "java.lang.String", example = "{}")
    private String extendSpec;

    // 购买须知
    @NotNull(message = "购买须知不能为空")
    @ApiModelProperty(name = "notice", value = "购买须知", required = true, dataType = "java.lang.String", example = "购买须知")
    private String notice;

    // 上架时间
    @NotNull(message = "上架时间不能为空")
    @ApiModelProperty(name = "uptime", value = "上架时间", required = true, dataType = "java.util.Date", example = "2019-04-28 16:14:31")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime uptime;

    // 下架时间
    @NotNull(message = "下架时间不能为空")
    @ApiModelProperty(name = "downtime", value = "下架时间", required = true, dataType = "java.util.Date", example = "2019-04-30 16:14:31")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime downtime;

    // 状态  0-档案 1-已审批 2-下架
    @NotNull(message = "状态不能为空")
    @ApiModelProperty(name = "status", value = "状态", required = true, dataType = "java.lang.Integer", example = "0")
    private Integer status;
}  